package org.chen.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName("user_video_config")
public class UserVideoConfig extends Model<UserVideoConfig> {
    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    
    private String name;
    
    @TableField("avatar_id")
    private String avatarId;
    
    @TableField("voice_id")
    private String voiceId;
    
    @TableField("background_color")
    private String backgroundColor;

    // 新增背景相关字段
    @TableField("background_type")
    private String backgroundType; // "color", "image", "video"

    @TableField("background_url")
    private String backgroundUrl;

    @TableField("background_fit")
    private String backgroundFit; // "crop", "cover", 等

    @TableField("background_play_style")
    private String backgroundPlayStyle; // "loop", "once", 等

    @TableField("background_id")
    private String backgroundId;

    // 新增人物配置字段
    @JsonProperty("xOffset")
    private Double xOffset;
    @JsonProperty("yOffset")
    private Double yOffset;
    private Double scale;

    private Integer width;
    
    private Integer height;
    
    @TableField("is_default")
    private Boolean isDefault;

    @TableField("is_caption")
    private Boolean isCaption;
    
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField("is_auto")
    private Boolean isAuto;

    @TableField("config_type")
    private String configType = "single";
}